package com.community.common;

import com.google.common.collect.Sets;

import java.util.Set;

/**
 * Created by geely
 */
public class Const {

    public static final String CURRENT_USER = "currentUser";

    public static final String EMAIL = "email";
    public static final String USERNAME = "username";
    public static final String PHONE = "phone";
    public static final Integer DEFAULTVERSION = 1;
    public static final String REQUESTURL = "*";//请求端口
    public static final int cacheTime = 60*60;
    public static final double MINMONEY = 100.0;
    public static final String SESSIONVCODE ="sessionVCode";//验证码

    public static final Integer MAXSIZE = 20;//最大查询数
    public static final Integer MAXSIZETWO = 50;//最大查询数
    public static final String MESSAGE = "message";

    public interface ProductListOrderBy{
        Set<String> PRICE_ASC_DESC = Sets.newHashSet("price_desc","price_asc");
    }

    public interface RequestNums{
        int MAXREQUESTMESSAGE = 50;//请求短信数
    }

    public interface CodeType{
        String PCLOGINSTRCODE = "pcLoginStrCode";//电脑端网页验证码
        String APPLOGINSTRCODE = "appLoginStrCode";//移动网页验证码
        String MAILSERVERCODE = "mailServerCode";//邮寄申请验证码
        String PHONECODE = "phoneCode";//手机短信验证码
        String NOCODE = "nocode";//没有验证码
    }

    public interface Role{
        int ROLE_CUSTOMER = 0; //普通用户
        int ROLE_ADMIN = 1;//管理员
    }

    public interface Psac0001Status{
        int DISABLE = 0;//禁用
        int TAKEEFFECT = 1;//生效
        int PRESERVATION = 2;//已保存
        int BLACK = 3;//黑名单
        int REJECT = 4;//驳回
    }

    public interface Msg{
        String SAVESUCCESS = "保存成功";
        String UPDATESUCCESS = "更新成功";
        String DELSUCCESS = "删除成功";
        String SELECTSUCCESS = "查询成功";
        String SAVEERROR = "保存失败";
        String UPDATEERROR= "更新失败";
        String DELERROR = "删除失败";
        String SELECTERROR = "查询失败";
        String NOACCESS = "无访问权限";
        String USERNOLOGIN = "未登录用户";
        String PARAMTERERROR = "参数错误";
        String DATAISUPDATE = "数据被更新，请刷新后重试！";
        String FILEFORMATERROR = "文件格式错误";
        String IMPORTSUCCESS = "导入成功";
        String FILEUPLOADSUCCESS = "附件上传成功";
        String ACCOUNTABNORMALITY = "积分账户异常";
        String DEFICIENCY = "余额不足";
        String PAYREPEAT = "支付重复";
    }

    public interface PsacStatus{
        //1生效，2已保存，3黑名单,4:驳回
        Integer TAKEEFFECT = 1;
        Integer BEENSAVED = 2;
        Integer BLACKLIST = 3;
        Integer REJECT = 4;
    }

    public interface NoticeType{//消息通知类型
        Integer TIMELY = 1;//即时
        Integer INTERVAL = 2;//时间区间
    }

    public interface MessageStatus{//消息状态
        Integer TAKEEFFECT = 1;//生效
        Integer INVALID = 2;//失效
    }

    public interface  MessageContent{//消息内容
        String PSACTAKEEFFECT = "您的账号注册信息已审核通过";
        String PSACREJECT = "您的账户注册信息被驳回，请修改后重新提交";
    }

    public interface EmergencyDegree{
        //紧急程度
        Integer URGENT = 1;//紧急
        Integer NONEMERGENCY = 2;//非紧急
    }

    public interface AnswerOpertion{
        //回答操作
        Integer AGREE = 1;//赞同
        Integer OPPOSE = 2;//反对
        Integer SHARE = 3;//分享
        Integer KEEP = 4;//收藏
        Integer REPORT = 5;//举报
        Integer UNINTERESTED =6;//不感兴趣
    }

    public interface YesOrNo{
        Integer YES = 1;//是
        Integer NO = 2;//否
    }

    public interface RemindTarget{//提醒的作用对象
        Integer ONE = 1;//提问
        Integer TWO = 2;//回答
        Integer THREE = 3;//评论
    }

    public interface LockStatus{//账户锁定值
        Integer LOCK = 1;//锁定
        Integer UNLOCK = 2;//解锁
    }

    public interface Algorithm{//算法
        Integer ADD = 1;//加
        Integer MINUS = 2;//减
    }

    public interface TradingNotes{//交易备注
        String ONE = "悬赏提问";
        String TWO = "打赏";
        String THREE = "答案采纳";
        String FOUR = "答案付费";
    }

    public interface QuestStatus{//问题状态
        Integer WAITANSWER = 1;//等待解答
        Integer WQITHANDLE = 2;//等待处理
        Integer ANSWERED = 3;//已解答
        Integer DELETED = 4;//已删除
    }

    public interface CommentType{//评论类型
        Integer ONE = 1;//回答
        Integer TWO = 2;//评论
    }

    /**
     * 短信验证码缓存名称
     */
    public interface MessageCodeCacheName{
        String  REGISTERMESSAGE = "registerMessage";
        String UPDATEPASSWORD = "updatePasswordSendMessageCode";
    }

    /**
     * 问题查询方式
     */
    public interface QuestionSelectType{
        String NEWQUESTION = "newquestion";//最新问题
        String HIGHREWARD = "highreward";//高悬赏
        String HOT = "hot";//热门
        String URGENT = "urgent";//紧急
        String ARTICLE = "Article";//文章
    }

    public interface QuestionType{
        Integer NEWQUESTION = 1;//最新问题
        Integer HIGHREWARD = 2;//高悬赏
        Integer HOT = 3;//热门
        Integer URGENT = 4;//紧急
        Integer ARTICLE = 5;//文章
    }

    public interface SolrType{
        String CONTENT = "content";
    }

    public interface MessageType{//消息类型1:公告,2:提醒,3:私信
        Integer NOTICE = 1;//公告
        Integer REMIND = 2;//提醒
        Integer PRIVATELETTER = 3;//私信
    }

    public interface EventType{//事件类型
        Integer ONE = 1;//点赞
        Integer TWO = 2;//回复
        Integer THREE = 3;//回答
        Integer FOUR = 4;//评论
    }

    public interface AnswerModel{//答案可见模式
        Integer OPEN = 1;//公开
        Integer PAY = 2;//付费
    }

}
